/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.softace.jdbc;

import java.lang.reflect.Field;

/**
 *
 * @author s1lent_warrior
 */
class JdbcFieldData {

    private final Field field;
    private final Object fieldValue;
    private final JdbcColumn column;

    JdbcFieldData(Field field, Object fieldValue, JdbcColumn column) {
        this.field = field;
        this.fieldValue = fieldValue;
        this.column = column;
    }

    public Field getField() {
        return field;
    }

    public Object getFieldValue() {
        return fieldValue;
    }

    public JdbcColumn getColumn() {
        return column;
    }

    @Override
    public String toString() {
        return "JdbcFieldData{"
                + "fieldName=" + field.getName() + ", "
                + "fieldType=" + field.getType().getName() + ", "
                + "fieldValue=" + fieldValue + ", "
                + "JdbcColumn=" + column.getTableName() + "." + column.getColumnName()
                + '}';
    }
}
